import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 使用element
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 公共样式
import './assets/css/base.css'
import './assets/css/header_left.css'
import './assets/js/base.js'
// ztree的使用
import '@ztree/ztree_v3/js/jquery.ztree.core.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.excheck.min.js'
import '@ztree/ztree_v3/js/jquery.ztree.exedit.min.js'
// // import '@ztree/ztree_v3/css/zTreeStyle/zTreeStyle.css'
import '@ztree/ztree_v3/css/metroStyle/metroStyle.css'

import axios from 'axios'
// 配置请求的跟路径
axios.defaults.baseURL = 'http://122.96.153.122:50001/'
axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 在最后必须 return config
  return config
})
Vue.prototype.$http = axios
Vue.config.productionTip = false
Vue.use(ElementUI)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
